#ifndef __VECTOR2_H__
#define __VECTOR2_H__

typedef double ValueType;
typedef struct {
	ValueType data[2];
	int size;
}Vector2d;

Vector2d* vector2d_create(ValueType d[]);
Vector2d* vector2d_free(Vector2d* vector);


Vector2d* vector2d_add(Vector2d* a, Vector2d* b, Vector2d* c);
Vector2d* vector2d_sub(Vector2d* a, Vector2d* b, Vector2d* c);
Vector2d* vector2d_mul_scalar(Vector2d* a, ValueType k, Vector2d* b);

ValueType vector2d_dot(Vector2d* a, Vector2d* b);
ValueType vector2d_cross(Vector2d* a, Vector2d* b);

ValueType vector2d_norm(Vector2d* a);
Vector2d* vector2d_normalize(Vector2d* a);

#endif //__VECTOR2_H__
